% iiter.m% simple iterations.% IterSteps set in isetup.xstep = 0.0;%load all;%load a; load b; load x;igetbb;igetl;l0 = l;l00 = l;disp(l);for tIter = 1:IterSteps,  if OptStep == 0,    for tt=1:3,      igeta;      igetb;    end;    save a a;    save b b;    igetsig;    igetbb;    igetl;    disp(fix(clock));    disp([ tIter, (l-l00), sig, 10*a(48), b(48), 10*x(kx)]);    else        x0=x;    for tt=1:3,      igeta;      igetb;    end;    %disp('finished igeta and igetb');    save a a;    save b b;      igetsig;    igetbb;    igetl; l0=l;    %disp(fix(clock));    %disp([ tIter, (l-l00), sig,  100*a(48), b(48), 10*x(kx)]);    igetx;    %x1=x;    x1=x0+2*(x-x0); %double the step for examining                    %if xstep =1, it = 2 of the former steps    x=x1; igetxns;    for tt=1:3,      igeta;      igetb;    end;    igetbb;igetl;l1=l;    x2=x0+2*(x1-x0);    x=x2; igetxns;    for tt=1:3,      igeta;      igetb;    end;    igetbb;igetl; l2=l;        if ((2*l2-4*l1+2*l0) ==0),         save a a /ascii        save b b /ascii;     end;    xstep = (l2-4*l1+3*l0) / (2*l2-4*l1+2*l0);    if xstep > 4.0, xstep = 4.0; end;    x = x0 + xstep*(x1-x0);igetxns;    for tt=1:3,      igeta;      igetb;    end;    %disp('finished igeta and igetb');    save a a;    save b b;      igetsig;    igetbb;    igetl; %l0=l;    disp(fix(clock));    disp([ tIter, (l-l00), sig, 2*xstep, 10*a((ka-2)), b((kb-2)), 10*x(kx)]);    disp([ tIter, (l-l00), sig, 2*xstep, 10*a((ka-1)), b((kb-1)), 10*x(kx)]);    disp([ tIter, (l-l00), sig, 2*xstep, 10*a(ka), b(kb), 10*x(kx)]);    save x x;    save all;     end;end;